package gamecode;

public class DPoint {

	private double x, y;
	
	public DPoint() {
		x = 0;
		y = 0;
	}
	
	public DPoint(double nx, double ny) {
		this.x = nx;
		this.y = ny;
	}
	
	public void setLocation(double nx, double ny) {
		this.x = nx;
		this.y = ny;
	}
	
	public void setLocation(DPoint p) {
		this.x = p.getX();
		this.y = p.getY();
	}
	
	public double getX() {
		return x;
	}
	
	public double getY() {
		return y;
	}
	
	public void translate(double nx, double ny) {
		this.x += nx;
		this.y += ny;
	}
}
